/* ==========================================================
   1. RESET & VARIABLES BASE DESIGN
   ========================================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Arial";
}

body {
  background-color: #f8efe0; /* Warna Cream Base sesuai contoh */
  color: #0e1e38; /* Warna Navy Gelap */
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}
.text-center {
  text-align: center;
}

/* ==========================================================
   2. NAVBAR (DILOCK AGAR KOKOH SAAT DATA / ZOOM BERUBAH)
   ========================================================== */
header {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2.5rem 8%;
  z-index: 100;
}

.logo {
  font-family: "karethtrial";
  color: #f9f6e5;
  font-weight: normal;
  font-size: 1.25rem;
  line-height: 1.2;
  letter-spacing: 0.5px;
}

nav ul {
  display: flex;
  list-style: none;
  gap: 2.2rem;
}

nav ul li a {
  font-family: "Flair Display";
  color: #f9f6e5;
  text-decoration: none;
  font-size: 0.95rem;
  opacity: 0.85;
  transition:
    color 0.3s ease,
    opacity 0.3s ease;
}

nav ul li a.active,
nav ul li a:hover {
  color: #e6c687; /* Gold Highlight */
  opacity: 1;
}

.menu-toggle {
  display: none; /* Desktop hidden */
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
}
.menu-toggle span {
  width: 25px;
  height: 2px;
  background-color: #fff;
}

/* ==========================================================
   3. HERO MOTIF WITH IMMUTABLE LEFT ALIGNMENT
   ========================================================== */
.hero-motif {
  position: relative;
  padding: 14rem 8% 11rem 8%;
  background:
    linear-gradient(rgba(0, 0, 0, 0.45), rgba(0, 0, 0, 0.45)),
    url("../Aset/Batik1.jpeg") no-repeat center center/cover;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start !important; /* Terkunci Rata Kiri Mandat */
  text-align: left !important;
  width: 100%;
}

.hero-content {
  position: relative;
  z-index: 5;
  width: 100%;
  max-width: 1200px;
  margin: 0;
}

.hero-content h1 {
  font-size: 2.85rem;
  font-family: "karethtrial";
  color: #f9f6e5;
  font-weight: normal;
  margin-bottom: 0.5rem;
  letter-spacing: 0.5px;
}

.breadcrumb {
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.9rem;
}

.breadcrumb span {
  color: #fff;
  font-weight: bold;
}

/* --- WAVES ARCHITECTURE (PERSIS DENGAN BENTUK GAMBAR) --- */
.wave-container {
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 100%;
  line-height: 0;
  overflow: hidden;
}

.wave-container svg {
  position: relative;
  display: block;
  width: calc(100% + 1.3px);
  height: 140px;
}

/* ==========================================================
   4. INTERACTIVE CATEGORIES & CARD GRID SYSTEMS
   ========================================================== */
.motif-section {
  padding: 4rem 8% 6rem 8%;
  background-color: #f8efe0;
  width: 100%;
}

/* Container Kategori Filter */
.categories-container {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  max-width: 1200px;
  margin: 0 auto 4rem auto;
}

.btn-category {
  background-color: #eadcb9; /* Box Cokelat Pastel Muda */
  border: none;
  font-family: "Flair Display";
  color: #0e1e38;
  padding: 0.5rem 2.2rem;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-category.active,
.btn-category:hover {
  background-color: #d6c295;
  font-weight: bold;
}

/* Grid System Anti-Zoom Broken */
.grid-motif {
  display: grid;
  grid-template-columns: repeat(4, 1fr); /* Tetap 4 kolom presisi desktop */
  gap: 25px;
  max-width: 1200px;
  margin: 0 auto;
}

.card-motif {
  background: #f8efe0;
  border: 1px solid #0e1e38; /* Border line tipis sesuai gambar */
  padding: 0;
  display: flex;
  flex-direction: column;
}

.img-wrapper {
  width: 100%;
  height: 200px;
  border-bottom: 1px solid #0e1e38;
  overflow: hidden;
}

.card-motif img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.card-motif:hover img {
  transform: scale(1.04);
}

.card-body {
  padding: 1.2rem;
  background: #f8efe0;
}

.card-body h4 {
  font-family: "Flair Display";
  font-size: 1rem;
  color: #0e1e38;
  font-weight: 500;
}

/* Tombol Next */
.pagination-container {
  display: flex;
  justify-content: center;
  margin-top: 4rem;
  width: 100%;
}

.btn-next {
  display: inline-block;
  background-color: #eadcb9;
  font-family: "Flair Display";
  color: #0e1e38;
  text-decoration: none;
  padding: 0.5rem 2.5rem;
  font-size: 1rem;
  font-weight: 500;
  transition: background-color 0.3s;
}

.btn-next:hover {
  background-color: #d6c295;
}

/* ==========================================================
   5. FOOTER SECTION WITH INVERTED WAVE TOP
   ========================================================== */
footer {
  position: relative;
  background-color: #0e1e38;
  color: #fff;
  padding: 160px 8% 40px 8%;
}

.wave-top {
  position: absolute;
  top: -1px;
  left: 0;
  width: 100%;
  line-height: 0;
  overflow: hidden;
}

.wave-top svg {
  display: block;
  width: calc(100% + 1.3px);
  height: 120px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  max-width: 1200px;
  margin: 0 auto;
  padding-bottom: 3rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-about h3 {
  font-family: "Karethtrial";
  font-size: 1.35rem;
  line-height: 1.3;
  margin-bottom: 1.2rem;
  font-weight: 500;
}

.footer-about p {
  font-family: "Flair Display";
  font-size: 0.85rem;
  opacity: 0.7;
  line-height: 1.6;
}

.footer-col h4 {
  font-family: "Karethtrial";
  font-size: 1rem;
  color: #fff;
  margin-bottom: 1.5rem;
  font-weight: 500;
}

.footer-col ul {
  list-style: none;
}

.footer-col ul li {
  margin-bottom: 0.8rem;
}

.footer-col ul li a {
  font-family: "Flair Display";
  color: #fff;
  text-decoration: none;
  font-size: 0.85rem;
  opacity: 0.65;
  transition: 0.3s ease;
}

.footer-col ul li a:hover {
  opacity: 1;
  color: #e6c687;
}

.footer-bottom {
  font-family: "Flair Display";
  text-align: center;
  padding-top: 2rem;
  font-size: 0.8rem;
  opacity: 0.5;
}
/* --- PENGATURAN LINK KARTU MOTIF --- */
.card-motif-link {
  text-decoration: none; /* Menghilangkan garis bawah pada link */
  color: inherit; /* Memaksa warna teks mengikuti style asli kartu */
  display: block; /* Membuat satu kotak penuh kartu responsif bisa diklik */
}
/* ==========================================================
   6. ABSOLUTE RESPONSIVE BREAKPOINTS (LOCK LEFT & ANTI JUMP)
   ========================================================== */

@media (max-width: 1024px) {
  .grid-motif {
    grid-template-columns: repeat(3, 1fr); /* Layar sedang 3 Kolom */
  }
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  header {
    padding: 1.5rem 5%;
    flex-direction: column; /* Mengubah logo dan menu berjejer atas-bawah agar muat */
    align-items: flex-start;
    gap: 0.8rem;
  }

  nav {
    display: block; /* Memastikan menu TETAP MUNCUL di handphone */
    width: 100%;
  }

  nav ul {
    flex-wrap: wrap;
    justify-content: flex-start; /* Menu berjejer rapi ke kiri di HP */
    gap: 1rem;
  }

  nav ul li a {
    font-size: 0.85rem; /* Memperkecil ukuran teks agar pas di layar HP */
  }

  /* Menyembunyikan tombol hamburger karena menu teks sudah ditampilkan langsung */
  .menu-toggle {
    display: none !important;
  }

  .menu-toggle {
    display: flex;
  }

  .hero-motif {
    padding: 10rem 6% 6rem 6%;
    align-items: flex-start !important;
    text-align: left !important;
  }

  .hero-content h1 {
    font-size: 2.1rem;
  }

  .grid-motif {
    grid-template-columns: repeat(
      2,
      1fr
    ); /* Handphone Landscape / Standar 2 kolom */
    gap: 15px;
  }

  .wave-container svg {
    height: 80px;
  }

  .wave-top svg {
    height: 70px;
  }
}

@media (max-width: 480px) {
  .hero-motif {
    padding: 9rem 5% 5rem 5%;
  }

  .hero-content h1 {
    font-size: 1.75rem;
  }

  .categories-container {
    gap: 0.8rem;
  }

  .btn-category {
    padding: 0.4rem 1.4rem;
    font-size: 0.85rem;
  }

  .grid-motif {
    grid-template-columns: 1fr; /* Handphone Tegak Lurus 1 Kolom Penuh */
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }
}

/* Dukungan fungsional tanpa mengubah desain visual */
[hidden] {
  display: none !important;
}
